package com.mcptt.config.ue.initial.sub;

import org.jdom.Element;
import org.jdom.JDOMException;

public class DefaultUserProfile {
	public static final String Name = "Default-user-profile";
	private static final String Name_UserID = "User-ID";
	private static final String Name_UserProfileIndex = "user-profile-index";
	
	private String uerId = null;
	private String  userProfileIdex = null;
	public void parse(Element elem) throws JDOMException
	{
		if(elem == null)
		{
			return;
		}
		uerId = elem.getAttributeValue(Name_UserID);
		userProfileIdex = elem.getAttributeValue(Name_UserProfileIndex);
	}
	
	public String toString()
	{
		StringBuffer strBuf = new StringBuffer("\r\n");
		strBuf.append("<").append(Name).append(" ");
		strBuf.append(Name_UserID).append("=\"").append(uerId).append("\" ");
		strBuf.append(Name_UserProfileIndex).append("=\"").append(userProfileIdex).append("\"/>");

		return strBuf.toString();
	}
}
